Configure Local User using CLI

Manage local users using the cli.

Only users with the role SecurityAdmin or SystemAdmin can perform this task.

  1. Add user:
    For the local user creation, username, email id, and user role parameters are mandatory. The username and email id must be unique.
    efa auth user add --userName user1 --emailID user1@test.com --roles SystemAdmin
    Password: ****
    Successfully added the user configuration                    
  2. Change Password on First Login:
    You are prompted to change the password on first login.
    1. In the New Password field, enter the password.
    2. In the Confirm Password field, enter the password again.
    3. The password is changed and you are logged out.
    4. Login again using the new password.
    efa login --username user1
    Password: ****
    Please reset the password
    New password: ****
    Confirm password: ****
                            
    The user password was reset successfully. Please log in again.                    
  3. Update User:
    Updating the profile details of a local user.
    Example:
    efa auth user update --userName=user1 --roles NetworkOperator
    Successfully updated the user configuration.
    +----------+-----------------+------------+----------------+---------------+--------------+
    | Username | Roles           | Is Blocked | Email ID       | Mobile Number | Organization |
    +----------+-----------------+------------+----------------+---------------+--------------+
    | user1    | NetworkOperator | false      | user1@test.com |               |              |
    +----------+-----------------+------------+----------------+---------------+--------------+                    
  4. Block User:
    Block the local user account. The blocked user will be prohibited from login to the XCO.
    efa auth user block-unblock --userName=user1 --isBlock=true
    Successfully updated the user state.
    +----------+-----------+
    | UserName | IsBlocked |
    +----------+-----------+
    | user1    | true      |
    +----------+-----------+                    
  5. Unblock User:
    Unblock the local user account.
    efa auth user block-unblock --userName=user1 --isBlock=false
    Successfully updated the user state.
    +----------+-----------+
    | UserName | IsBlocked |
    +----------+-----------+
    | user1    | false     |
    +----------+-----------+                    
  6. Change password:
    Change the password of a logged in user.
    efa auth user change-password
    Old password: ****
    New password: ****
    The password was changed successfully                    
  7. Reset password:
    Only a user with the SystemAdmin role can reset the password of local users.
    efa auth user reset-password --userName user1 --emailID user1@test.com
    Password:
    Successfully updated the user configuration                    
  8. Show users:
    Display the local users with details.
    efa auth user show
    +----------+-----------------+------------+-------------------+---------------+--------------+
    | Username | Roles           | Is Blocked | Email ID          | Mobile Number | Organization |
    +----------+-----------------+------------+-------------------+---------------+--------------+
    | testabc  | SystemAdmin     | false      | testabc@test.com  |               |              |
    +----------+-----------------+------------+-------------------+---------------+--------------+
    | user1    | NetworkOperator | false      | user1@test.com    |               |              |
    +----------+-----------------+------------+-------------------+---------------+--------------+                    
  9. Delete user:
    Only a user with the role of SystemAdmin or SecurityAdmin can delete a local user.
    efa auth user delete --userName=user1
    Deleted User configuration successfully.